home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Font / c / LoseAll < prev   
Text File  |  1993-06-29  |  1KB  |  33 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Font.c.LoseAll
  12.     Author:  Copyright © 1993 Jason Williams
  13.     Version: 1.00 (29 Jun 1993)
  14.     Purpose: Releases all font claims which have been counted in the given
  15.              font_array. Typically used to release all fonts found by the
  16.              Template loading process. (See Font.h, Template.h, Window.h)
  17. */
  18.  
  19. #include "DeskLib:Font.h"
  20.  
  21. extern void Font_LoseAllFonts(font_array *fonts)
  22. {
  23.   int i;
  24.  
  25.   for (i = 0; i < 256; i++)
  26.     while (fonts->fonts[i] > 0)           /* Lose all instances of this font */
  27.     {
  28.       Font_LoseFont(i);
  29.       fonts->fonts[i]--;            /* Decrement count until it reaches zero */
  30.     }
  31. }
  32.  
  33.